<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 5.4.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha256-AbA177XfpSnFEvgpYu1jMygiLabzPCJCRIBtR5jGc0k=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"tomstand.gitee.io","root":"/","images":"/images","scheme":"Muse","darkmode":false,"version":"8.13.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"Searching...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"}}</script><script src="/js/config.js"></script>

    <meta name="description" content="基于node的跨平台抓包代理工具whistle 详细内容请进入官网查看 http:&#x2F;&#x2F;wproxy.org&#x2F;whistle&#x2F;   安装Node whistle支持v0.10.0以上版本的Node，为获取更好的性能，推荐安装最新版本的Node。  Windows或Mac系统，访问https:&#x2F;&#x2F;nodejs.org&#x2F;，安装**LTS**版本的Node，默认安装即可 Linux下推荐使用源码安装: 从">
<meta property="og:type" content="article">
<meta property="og:title" content="猿日记">
<meta property="og:url" content="https://tomstand.gitee.io/2023/11/21/%E5%9F%BA%E4%BA%8Enode%E7%9A%84%E8%B7%A8%E5%B9%B3%E5%8F%B0%E6%8A%93%E5%8C%85%E4%BB%A3%E7%90%86%E5%B7%A5%E5%85%B7whistle/index.html">
<meta property="og:site_name" content="猿日记">
<meta property="og:description" content="基于node的跨平台抓包代理工具whistle 详细内容请进入官网查看 http:&#x2F;&#x2F;wproxy.org&#x2F;whistle&#x2F;   安装Node whistle支持v0.10.0以上版本的Node，为获取更好的性能，推荐安装最新版本的Node。  Windows或Mac系统，访问https:&#x2F;&#x2F;nodejs.org&#x2F;，安装**LTS**版本的Node，默认安装即可 Linux下推荐使用源码安装: 从">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://img-blog.csdnimg.cn/img_convert/d7fd4517ce4e6b894a865e0b8a60e170.png">
<meta property="og:image" content="https://img-blog.csdnimg.cn/img_convert/171c93dd8e977700850137ac62831cc7.png">
<meta property="og:image" content="https://img-blog.csdnimg.cn/img_convert/8af790aa23bb8772cbad34fa2bbc132b.png">
<meta property="og:image" content="https://img-blog.csdnimg.cn/img_convert/5c21de207a8f46ca3ae52815c698537c.png">
<meta property="article:published_time" content="2023-11-21T12:16:19.933Z">
<meta property="article:modified_time" content="2023-11-21T12:16:19.933Z">
<meta property="article:author" content="tomstand">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img-blog.csdnimg.cn/img_convert/d7fd4517ce4e6b894a865e0b8a60e170.png">


<link rel="canonical" href="https://tomstand.gitee.io/2023/11/21/%E5%9F%BA%E4%BA%8Enode%E7%9A%84%E8%B7%A8%E5%B9%B3%E5%8F%B0%E6%8A%93%E5%8C%85%E4%BB%A3%E7%90%86%E5%B7%A5%E5%85%B7whistle/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"en","comments":true,"permalink":"https://tomstand.gitee.io/2023/11/21/%E5%9F%BA%E4%BA%8Enode%E7%9A%84%E8%B7%A8%E5%B9%B3%E5%8F%B0%E6%8A%93%E5%8C%85%E4%BB%A3%E7%90%86%E5%B7%A5%E5%85%B7whistle/","path":"2023/11/21/基于node的跨平台抓包代理工具whistle/","title":""}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title> | 猿日记</title>
  






  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar" role="button">
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">猿日记</p>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>







</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%9F%BA%E4%BA%8Enode%E7%9A%84%E8%B7%A8%E5%B9%B3%E5%8F%B0%E6%8A%93%E5%8C%85%E4%BB%A3%E7%90%86%E5%B7%A5%E5%85%B7whistle"><span class="nav-number">1.</span> <span class="nav-text">基于node的跨平台抓包代理工具whistle</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">tomstand</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">12</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
  </nav>
</div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="Back to top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="en">
    <link itemprop="mainEntityOfPage" href="https://tomstand.gitee.io/2023/11/21/%E5%9F%BA%E4%BA%8Enode%E7%9A%84%E8%B7%A8%E5%B9%B3%E5%8F%B0%E6%8A%93%E5%8C%85%E4%BB%A3%E7%90%86%E5%B7%A5%E5%85%B7whistle/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="tomstand">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="猿日记">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content=" | 猿日记">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2023-11-21 20:16:19" itemprop="dateCreated datePublished" datetime="2023-11-21T20:16:19+08:00">2023-11-21</time>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h2 id="基于node的跨平台抓包代理工具whistle"><a href="#基于node的跨平台抓包代理工具whistle" class="headerlink" title="基于node的跨平台抓包代理工具whistle"></a>基于node的跨平台抓包代理工具whistle</h2><blockquote>
<p>详细内容请进入官网查看 <a target="_blank" rel="noopener" href="http://wproxy.org/whistle/">http://wproxy.org/whistle/</a></p>
</blockquote>
<ol>
<li><p>安装Node</p>
<p>whistle支持<code>v0.10.0</code>以上版本的Node，为获取更好的性能，推荐安装最新版本的Node。</p>
<ul>
<li>Windows或Mac系统，访问<a target="_blank" rel="noopener" href="https://nodejs.org/%EF%BC%8C%E5%AE%89%E8%A3%85**LTS**%E7%89%88%E6%9C%AC%E7%9A%84Node%EF%BC%8C%E9%BB%98%E8%AE%A4%E5%AE%89%E8%A3%85%E5%8D%B3%E5%8F%AF">https://nodejs.org/，安装**LTS**版本的Node，默认安装即可</a></li>
<li>Linux下推荐使用源码安装: 从<a target="_blank" rel="noopener" href="https://nodejs.org/en/download/">Node官网</a>下载最新版的<strong>Source Code</strong>(或者用<code>wget</code>命令下载)，解压文件(<code>tar -xzvf node-vx.y.z.tar.gz</code>)后进入解压后的根目录(<code>node-vx.y.z</code>)，依次执行<code>./configure</code>、<code>./make</code>和<code>./make install</code>。</li>
</ul>
</li>
<li><p>安装whistle</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install -g whistle</span><br></pre></td></tr></table></figure>

<p>npm默认镜像是在国外，有时候安装速度很慢或者出现安装不了的情况，如果无法安装或者安装很慢，可以使用taobao的镜像安装：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">$ npm install cnpm -g --registry=https://registry.npm.taobao.org</span><br><span class="line">$ cnpm install -g whistle</span><br><span class="line"></span><br><span class="line">或者直接指定镜像安装：</span><br><span class="line">$ npm install whistle -g --registry=https://registry.npm.taobao.org</span><br></pre></td></tr></table></figure></li>
<li><p>启动whistle</p>
<blockquote>
<p>最新版本的whistle支持三种等价的命令<code>whistle</code>、<code>w2</code>、<code>wproxy</code></p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">启动whistle</span><br><span class="line">w2 restart</span><br><span class="line">停止whistle</span><br><span class="line">w2 stop</span><br><span class="line">调试模式</span><br><span class="line">w2 run</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>启动后默认端口是8899，如果需要切换端口可以加<code>-p</code>切换 根据日志访问对应网址就可以显示具体的数据<br><img src="https://img-blog.csdnimg.cn/img_convert/d7fd4517ce4e6b894a865e0b8a60e170.png" alt="image-20201210162331306.png"></p>
</li>
</ol>
<ol start="4">
<li>移动端抓包可以点击https栏目扫描二维码安装证书就可以抓到移动端的请求记录了</li>
</ol>
<p> <img src="https://img-blog.csdnimg.cn/img_convert/171c93dd8e977700850137ac62831cc7.png" alt="image-20201210162931997.png"></p>
<ol start="5">
<li><p>浏览器抓包推荐使用google浏览器下载插件</p>
<p>百度云盘链接：<a target="_blank" rel="noopener" href="https://pan.baidu.com/s/10LPdgM2sIiihDakV8xokoA">https://pan.baidu.com/s/10LPdgM2sIiihDakV8xokoA</a><br>提取码：vq3z </p>
<p>下载后再谷歌插件库中导入即可，开启代理就可以拦截请求</p>
</li>
</ol>
<p><img src="https://img-blog.csdnimg.cn/img_convert/8af790aa23bb8772cbad34fa2bbc132b.png" alt="image-20201210164150432.png"></p>
<ol start="6">
<li>还可以做域名代理，将官网域名代理到本地的服务中解决测试跨域的问题</li>
</ol>
<p><img src="https://img-blog.csdnimg.cn/img_convert/5c21de207a8f46ca3ae52815c698537c.png" alt="image-20201210164536231.png"></p>

    </div>

    
    
    

    <footer class="post-footer">

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2023/11/21/%E5%A4%A7%E6%95%B0%E6%8D%AE%E6%8A%80%E6%9C%AF%E6%A0%88/" rel="prev" title="">
                  <i class="fa fa-chevron-left"></i> 
                </a>
            </div>
            <div class="post-nav-item">
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">tomstand</span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/muse/" rel="noopener" target="_blank">NexT.Muse</a>
  </div>

    </div>
  </footer>

  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/schemes/muse.js"></script><script src="/js/next-boot.js"></script>

  





  





</body>
</html>
